import request from '@/utils/request'


//获取分页数据
export function getPageData(data) {
  return request({
    url: '/api/rs/manufacture/apply/page',
    method: 'post',
    data
  })
}

// 获取下发次序/api/rs/manufacture/apply/get_next_sequence
export function getNextSequence(data) {
  return request({
    url: '/api/rs/manufacture/apply/get_next_sequence',
    method: 'post',
    data
  })
}

// 保存生产指令/api/rs/manufacture/apply/save
export function pushSave(data) {
  return request({
    url: '/api/rs/manufacture/apply/save',
    method: 'post',
    data
  })
}
//// 改变状态（下发、取消等） /api/rs/manufacture/apply/update_status

export function updateStatus(data) {
  return request({
    url: '/api/rs/manufacture/apply/update_status',
    method: 'post',
    data
  })
}

// 删除/api/rs/manufacture/apply/delete

export function updateDelete(data) {
  return request({
    url: '/api/rs/manufacture/apply/delete',
    method: 'post',
    data
  })
}

// 获取单个指令信息/api/rs/manufacture/apply/get

export function getSingleData(data) {
  return request({
    url: '/api/rs/manufacture/apply/get',
    method: 'post',
    data
  })
}

// 修改/api/rs/manufacture/apply/update
export function pushUpdate(data) {
  return request({
    url: '/api/rs/manufacture/apply/update',
    method: 'post',
    data
  })
}


//分页查询已下发指令（用于待办事项） /api/rs/manufacture/apply/page_released

export function pageReleased(data) {
  return request({
    url: '/api/rs/manufacture/apply/page_released',
    method: 'post',
    data
  })
}


// 生产记录分页
// /api/rs/manufacture/record/modify/apply/page分页
export function recordPage(data) {
  return request({
    url: '/api/rs/manufacture/record/page',
    method: 'post',
    data
  })
}

// 提交生产记录修改

export function pushApplyForData(data) {
  return request({
    url: '/api/rs/manufacture/record/modify/apply/save',
    method: 'post',
    data
  })
}

// 生产记录修改申请分页
export function modifyRecordPage(data) {
  return request({
    url: '/api/rs/manufacture/record/modify/apply/page',
    method: 'post',
    data
  })
}

// 提交批生产记录 /api/rs/manufacture/archive/save

export function pushProduction(data) {
  return request({
    url: '/api/rs/manufacture/archive/save',
    method: 'post',
    data
  })
}

//更新状态：0-未修改，1-已修改 /api/rs/manufacture/record/modify/apply/update_status

export function updateModificationStatus(data) {
  return request({
    url: '/api/rs/manufacture/record/modify/apply/update_status',
    method: 'post',
    data
  })
}
// 获取批生产记录/api/rs/manufacture/archive/page

export function getLotProduction(data) {
  return request({
    url: '/api/rs/manufacture/archive/page',
    method: 'post',
    data
  })
}

// /api/rs/manufacture/archive/detail 查看批生产记录
export function viewLotProduction(data) {
  return request({
    url: '/api/rs/manufacture/archive/detail',
    method: 'post',
    data
  })
}

// 提交QA审核
export function pushQa(data) {
  return request({
    url: '/api/rs/manufacture/archive/apply_check',
    method: 'post',
    data
  })
}

// QA审核分页/api/rs/manufacture/archive/check_page
export function getQaPage(data) {
  return request({
    url: '/api/rs/manufacture/archive/check_page',
    method: 'post',
    data
  })
}

// qa审核 /api/rs/manufacture/archive/check
export function pushCheck(data) {
  return request({
    url: '/api/rs/manufacture/archive/check',
    method: 'post',
    data
  })
}